<#assign module="member"/>

<@override name="header">
</@override>
<@override name="body">

<div class="row">
	<div class="col-xs-6" style="width:50%;">
	  	<div class="btn-group">
  			<a class="btn btn-default" href="${ctx}/member/list">所有用户</a>
	  		<a class="btn btn-default" href="${ctx}/member/elist">企业信息</a>
	  		<a class="btn btn-default active" href="${ctx}/member/gradelist">用户等级</a>
	  		<@shiro.hasPermission name='blacklist'>
	  			<a class="btn btn-default" href="${ctx}/member/blacklist">黑名单</a>
	  		</@shiro.hasPermission>
	  		<@shiro.hasPermission name='phonevisit'>
	  			<a class="btn btn-default" href="${ctx}/phonevisit/list">回访记录</a>
	  		</@shiro.hasPermission>
	  		<@shiro.isMainCompany>
			  <@shiro.hasPermission name='memberapply'>
			  	<a class="btn btn-default" href="${ctx}/memberapply/list">VIP申请</a>
			  </@shiro.hasPermission>
		  	</@shiro.isMainCompany>
		  	<@shiro.hasPermission name='receipt'>
		  		<a class="btn btn-default" href="${ctx}/receipt/list">发票申请</a>
		  	</@shiro.hasPermission>
		</div>
	</div>
  	<div class="col-xs-4" style="width:35%;">
  		
  	</div>
  	<div class="col-xs-2" style="width:15%;">
		<button class="pull-right btn btn-primary"" onclick="window.location='${ctx}/member/addGrade';"><b>+</b>&nbsp;添加客户等级</button>
  	</div>
</div>

<div class="row margin-top">
	<div class="col-xs-12">
		
	</div>
</div>

	    
<div class="row margin-top">
	<div class="col-xs-12">
	<div class="panel panel-primary">
	<div class="table-responsive">
		<table class="table table-hover table-striped">
			<thead>
			<tr style="font-size:14px;">
				<th>名称</th>
				<th>添加时间</th>
				<th>操作</th>
			</tr>
			</thead>
			<tbody>
				<#if grades?? >
				  	<#list grades as data>
						<tr>
							<td>${data.name?if_exists}</td>
							<td>
								${data.created?date}
							</td>
							<td>
								<a href="${ctx}/member/editGrade/${data.id}?name=${data.name?if_exists}" class="btn-link">编辑</a>
							</td>
						</tr>
					</#list>
				</#if>
			</tbody>
		</table>
	</div>
	</div>
	</div>
</div>
</@override>

<@override name="footer">
	<script type="text/javascript">
		window.daijia = {
			ctx:'${ctx}',
			userId:'<@shiro.principal property='id'/>'
		};
	</script>
	<script src="${ctx}/assets/js/pushmessage.js"></script>
</@override>
<@extends name="../layout.ftl"/>